#:kivy 1.4.1

<Place>:
    size: 50, 50
    canvas:
        Color:
            rgb: 0, 0, 1
        Ellipse:
            pos: self.pos
            size: self.size

<Transition>:
    size: 50, 50
    canvas:
        Color:
            rgb: 0, 1, 0
        Rectangle:
            pos: self.pos
            size: self.size

<Arachne>:
    BoxLayout:
        size: root.size
        orientation: 'vertical'
        on_touch_up: pass
        BoxLayout:
            size_hint: 1, 0.15
            id: editChoice
            ToggleButton:
                id: place
                text: 'Place'
                group: 'editChoice'
                state: 'down'
            ToggleButton:
                id: transition
                text: 'Transition'
                group: 'editChoice'
            ToggleButton:
                id: arc
                text: 'Arc'
                group: 'editChoice'
        Widget:
            size_hint: 1, 0.85
            on_touch_up: (root.addPlace(self, args[1].pos) if place.state == 'down' else (root.addTrans(self, args[1].pos) if transition.state == 'down' else None)) if self.collide_point(args[1].pos[0], args[1].pos[1]) else None
            canvas:
                Color:
                    rgb: 0, 0, 0
                Rectangle:
                    pos: self.pos
                    size: self.size
    
